package apex;

import org.junit.Test;

import java.lang.reflect.Method;

public class Demo1 {
    @Test
    public void test1() throws ClassNotFoundException, NoSuchMethodException, InstantiationException, IllegalAccessException {
        /*
          Object invoke(Object obj,Object )
          参数一用obj调用该方法
          参数二调用方法中的传递的参数值
        */
        Class c = Class.forName("apex.Student");
        Method methed04 = c.getMethod("Methed04", String.class);
        System.out.println(methed04);

        Student student = (Student)c.newInstance();

    }
}
